package com.booter.hessian.client;


import com.booter.hessian.service.HessianTestService;
import com.caucho.hessian.client.HessianProxyFactory;

import java.net.MalformedURLException;


public class HessianClient {

    public static void main(String[] args) throws MalformedURLException {
        String url = "http://localhost:80/hessian/hessianTestService";
        HessianProxyFactory factory = new HessianProxyFactory();
        factory.setUser("admin");
        factory.setPassword("1");
        HessianTestService hessianServer = (HessianTestService) factory
                .create(HessianTestService.class, url);
        String ret = hessianServer.say("Raymond.chen");
        System.out.println("ret==" + ret);
    }

}
